package com.furtherstar.auth.protocol;

import com.yummy.convention.http.ResponseCode;

public enum AuthResponseCode implements ResponseCode{

	SECRET_EXPIRY(10000,"auth.secret.expiry"),
	NO_AUTH_APP(10001,"auth.noApp"),
	NO_AUTH_WORK(10005,"auth.noWork"),
	APP_EXIST(11001,"app.exist"),
	APP_NOTEXIST(11002,"app.notexist"),
	APP_USER_EXIST(12001,"app.user.exist"),
	USER_EXIST(13001,"user.exist"),
	USER_NOTEXIST(13002,"user.notexist"),
	OPT_ILLEGAL(14001,"opt.illegal"),
	ROLE_NOTEXIST(15001,"role.notexist"),
	ROLE_EXIST(15002,"role.exist"),
	DEPT_NOTEXIST(16001,"dept.notexist"),
	POSITION_NOTEXIST(17001,"position.notexist"),
	RESOURCE_NOTEXIST(18001,"resource,notexist"), 
	WORK_NOTEXIST(19001,"work.notexist"),
	WORK_EXIST(19002,"work.exist");
	
	private Integer code;
	private String msg;
	
	AuthResponseCode(Integer code ,String msg) {
		this.setCode(code);
		this.setMsg(msg);
	}

	@Override
	public Integer getCode() {
		return code;
	}

	@Override
	public String getMsg() {
		return msg;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
